function array3D = InitFortranArray3D(iDimensions,array1D)
% iDimension : the numbers of array for each dimension.
% array1D : 1D data array,which is fortran array ,loop for k--j--i.
% array3D : 3D array.
% nVar : number of variable.
nVar = size(array1D,2);

array3D = zeros(iDimensions(1),iDimensions(2),iDimensions(3),nVar);

for iVar = 1:nVar
    array3D(:,:,:,iVar) = reshape(array1D(:,iVar),...
        [iDimensions(1) iDimensions(2) iDimensions(3)]);
end

